import request from '@/utils/request';

export async function page(payload) {
  return request(`/back/biz/user/page?pageIndex=${payload.pageIndex}&pageSize=${payload.pageSize}`)
}

export async function get(id) {
  return request(`/back/biz/user/get/${id}`);
}

export async function del(payload) {
  return request(`/back/biz/user/del/${payload.uid}`, {
    method: 'POST'
  });
}

export async function delBatch(payload) {
  return request(`/back/biz/user/delBatch`, {
    method: 'POST',
    body: payload
  });
}

export async function add(payload) {
  return request(`/back/biz/user/save`, {
    method: 'POST',
    body: payload
  });
}

export async function update(payload) {
  return request(`/back/biz/user/update`, {
    method: 'PUT',
    body: payload
  });
}